SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO

/*
----------------------------------------------------------------------------------------------------

-- Created By:  ()
-- Purpose: Inserts a record into the Contact table
----------------------------------------------------------------------------------------------------
*/


CREATE PROCEDURE dbo.Contact_Insert
(

	@Id int    OUTPUT,

	@FullName nvarchar (50)  ,

	@Email nvarchar (50)  ,

	@Phone nvarchar (20)  ,

	@Description nvarchar (500)  ,

	@ContactType varchar (20)  ,

	@CreatedDate datetime   ,

	@UpdatedDate datetime   ,

	@CreatedUser varchar (50)  ,

	@UpdatedUser varchar (50)  
)
AS


				
				INSERT INTO [dbo].[Contact]
					(
					[FullName]
					,[Email]
					,[Phone]
					,[Description]
					,[ContactType]
					,[CreatedDate]
					,[UpdatedDate]
					,[CreatedUser]
					,[UpdatedUser]
					)
				VALUES
					(
					@FullName
					,@Email
					,@Phone
					,@Description
					,@ContactType
					,@CreatedDate
					,@UpdatedDate
					,@CreatedUser
					,@UpdatedUser
					)
				
				-- Get the identity value
				SET @Id = SCOPE_IDENTITY()
									
							
			

GO
